<template>
	<view class="detail">
		<view class="title">
			{{ info.title }}
		</view>
		<view class="text">
			作者：{{ info.author}}
			<span>
				时间：{{info.create_time}}
			</span>
		</view>
		<view class="" v-html="info.content">

		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info: {}
			}
		},
		onLoad(options) {
			this.articleInfo(options.id)
		},
		methods: {
			articleInfo(id) {
				uni.request({
					url: this.configs.webUrl + '/api/article/articleInfo',
					data: {
						id: id
					},
					success: data => {
						this.info = data.data
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.detail {
		padding: 20rpx;
		.title {
			font-size: 32rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: 600;
			color: #000000;
			text-align: center;
		}
		.text {
			display: flex;
			align-items: center;
			justify-content: space-between;
			font-size: 28rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: 400;
			margin: 20rpx 0;
		}
	}
</style>